package idv.cjcat.pyronova.nodes {
	import flash.geom.Rectangle;
	import idv.cjcat.pyronova.render.Graphics;
	import idv.cjcat.pyronova.render.RenderVisitor;
	
	public class FillRect extends Node {
		
		public var rect:Rectangle;
		public var color:uint;
		
		public function FillRect(rect:Rectangle = null, color:uint = 0x00000000) {
			this.rect = rect;
			this.color = color;
		}
		
		override public function render(visitor:RenderVisitor):void {
			var g:Graphics = visitor.graphics();
			var r:Rectangle = (rect)?(rect):(g.rect());
			g.fillRect(r, color);
		}
	}
}